cmake_minimum_required(VERSION 3.9)
project(step11)

add_executable(make_my src/make_my.cpp)

add_custom_command(
    OUTPUT ${PROJECT_BINARY_DIR}/my.h
    COMMAND make_my ${PROJECT_BINARY_DIR}/my.h
    DEPENDS make_my
)

add_custom_command(
    OUTPUT ${PROJECT_BINARY_DIR}/my2.h
    COMMAND echo \#define MY_DEFINE2 > ${PROJECT_BINARY_DIR}/my2.h
)

include_directories(${PROJECT_BINARY_DIR})

add_executable(step11 
    src/src11.cpp 
    ${PROJECT_BINARY_DIR}/my.h 
    ${PROJECT_BINARY_DIR}/my2.h
)

